//
//  AllMemberTicketExchangeHistory.m
//  NiuBanJin
//
//  Created by Billy on 15/10/30.
//  Copyright © 2015年 zzjr. All rights reserved.
//

#import "AllMemberTicketExchangeHistory.h"

@implementation AllMemberTicketExchangeHistory

- (instancetype)initWithAttributes:(NSDictionary *)attributesDic  {
    
    if (self = [super init]) {
        
        if ([attributesDic[@"type"] integerValue] == 1) {
            
            self.allMemberTicketExchangeHistory_type = TicketTypeAllMembeBlue;
        }else if([attributesDic[@"type"] integerValue] == 2) {
            
            self.allMemberTicketExchangeHistory_type = TicketTypeAllMembeYellow;
        }else if([attributesDic[@"type"] integerValue] == 3) {
            
            self.allMemberTicketExchangeHistory_type = TicketTypeAllMembeOrange;
        }else if ([attributesDic[@"type"] integerValue] > 2){ //不是已知的颜色统一弄成橙色暂时
            
            self.allMemberTicketExchangeHistory_type = TicketTypeAllMembeOrange;
        }

        self.allMemberTicketExchangeHistory_mobile = attributesDic[@"mobile"];
        self.allMemberTicketExchangeHistory_exchangeNote = attributesDic[@"exchangeNote"];
    }
    
    return  self;
}
@end
